import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import router from './router';
import pinia from './store'

import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import 'element-plus/dist/index.css';
import Cookies from 'js-cookie'

import Antd from 'ant-design-vue';
import * as AntIcons from '@ant-design/icons-vue';
// import 'ant-design-vue/dist/antd.css';

const app = createApp(App);

app.use(pinia);
app.use(router);
app.use(ElementPlus);
app.use(Antd);
// 将 Cookies 挂载到全局属性上
app.config.globalProperties.$cookies = Cookies

// 注册 Element Plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 注册 Ant Design Vue 图标
for (const [key, component] of Object.entries(AntIcons)) {
  app.component(key, component);
}

app.mount('#app');
